package templar

class Menu {
    static belongsTo = [parent:Menu]
    static hasMany = [children:Menu]
    List children

    String name
    String tooltip
    String controller
    String action
    
    static constraints = {
        name(nullable:false, empty:false, size:3..10)
        tooltip(nullable:true, empty:true, maxSize:100)
        controller(nullable:true, empty:false, maxSize:100)
        action(nullable:true, empty:true, maxSize:100)
        parent(nullable:true)
    }
}
